package com.mihoyo.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.mihoyo.basic.domain.BaseDomain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@NoArgsConstructor // 无参构造
@AllArgsConstructor // 有参构造
@Data // get set equals hashcode toString
public class Department extends BaseDomain {

    private String sn;

    private String name;

    private String dirPath;

    private Integer state;

    private Long managerId;

    private Long parentId;

    private Employee manager;

    private Department parent;

    // 为空时不返回
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();
}
